package com.shiwaixiangcun.customer.module.housebutler;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shiwaixiangcun.customer.R;

import java.util.List;

/**
 * Author   Administrator
 * Date     2018/1/17
 * Desc     eg
 * <p>
 * main  分类
 *
 * @author Administrator
 */

public class AdapterButler extends BaseQuickAdapter<ButlerCategory, BaseViewHolder> {
    public AdapterButler(@Nullable List<ButlerCategory> data) {
        super(R.layout.item_layout_bulter_categoty, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ButlerCategory item) {
        helper.setText(R.id.tv_name, item.getName());
        helper.setText(R.id.tv_desc, item.getRemake());
        ImageView iv = helper.getView(R.id.iv_cover);

        Glide.with(mContext).load(item.getIcon()).into(iv);
    }
}
